package com.gjintel.business.proj.service.impl;

import java.util.Date;
import java.util.List;

import com.gjintel.business.proj.model.BidderChange;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gjintel.business.proj.dao.IProjectBidDao;
import com.gjintel.business.proj.model.DepositReturn;
import com.gjintel.business.proj.model.ProjectBidInfo;
import com.gjintel.business.proj.model.ProjectInfo;
import com.gjintel.business.proj.service.IProjectBidService;
import com.gjintel.framework.common.service.IDepositService;
import com.gjintel.framework.register.model.DepositCategory;
import com.gjintel.sdk.base.dao.Page;
import com.gjintel.sdk.base.service.impl.BaseServiceImpl;

@Service("projectBidService")
public class ProjectBidServiceImpl  extends BaseServiceImpl implements IProjectBidService{
	@Autowired
    private IProjectBidDao projectBidDao;
	
	@Autowired
	private IDepositService depositService;
	
	@Override
	public List<ProjectBidInfo> getProjectBid(String projectId, String winningId) {
		
		return this.projectBidDao.getProjectBid(projectId,winningId);
	}

	@Override
	public List<ProjectBidInfo> getProjectBidCount(String projectId) {		
		return this.projectBidDao.getProjectBidCount(projectId);
	}

	@Override
	public List<ProjectBidInfo> getProjectBid(String projectId) {
		
	    return this.projectBidDao.getProjectBid(projectId);
	}

	
	@Override
	public List<ProjectBidInfo> getProjectBidByProjectId(String projectId) {
		return projectBidDao.getProjectBidByProjectId(projectId);
	}


			
	@Override
	public List<ProjectBidInfo> getUnReturnList(String projectId, Integer depositStatus, String winningId) {
		
		return this.projectBidDao.getUnReturnList(projectId,depositStatus,winningId);
	}

	@Override
	public List<DepositCategory> getDepositCategory(String winningId, String category) {
		
		return this.projectBidDao.getDepositCategory(winningId,category);
	}

	@Override
	public List<ProjectBidInfo> getUnWinAndUnReturnList(String projectId, Integer depositStatus) {
		
		return projectBidDao.getUnWinAndUnReturnList(projectId,depositStatus);
	}

	@Override
	public int getProjectBidCountByProjIdAndEvalutionResult(String projectId, int evalutionResult) {
		return projectBidDao.getProjectBidCountByProjIdAndEvalutionResult(projectId,evalutionResult);
	}

	@Override
	public List<DepositReturn> getDepositReturnList(String projectId) {
		
		return projectBidDao.getDepositReturnList(projectId);
	}

	@Override
	public List<DepositReturn> getUnBidDepositReturn(String projectId,String loginName,Page page,Integer type) {
		return projectBidDao.getUnBidDepositReturn(projectId,loginName,page,type);
	}



	@Override
	public Integer getProjectCount(Date date) {
		
		return projectBidDao.getProjectCount(date);
	}

	@Override
	public List<ProjectInfo> getProjectCodeCombo() {
		return this.projectBidDao.getProjectCodeCombo();
	}

	@Override
	public List<ProjectInfo> findListByWhere(ProjectInfo project, Date startTime, Date endTime) {
		return this.projectBidDao.findListByWhere(project,startTime,endTime);
	}

	@Override
	public List<ProjectBidInfo> findValidBidInfo(ProjectInfo projectInfo,Page page) {
		
		return this.projectBidDao.findValidBidInfo(projectInfo,page);
	}

	@Override
	public ProjectBidInfo getBidderInfo(String projectId, String bidderId) {
		
		return projectBidDao.getBidderInfo(projectId,bidderId);
	}

	@Override
	public List<BidderChange> getBidChangList(Page page) {
		return projectBidDao.getBidderChanList(page);
	}

	@Override
	public List<DepositReturn> getDepositReturnNoEvaluation(String projectId,Integer type) {
		return projectBidDao.getDepositReturnNoEvaluation(projectId,type);
	}
}
